package com.xunk.scene.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

/**
 * @ProjectName: xunk-scene
 * @Package: com.xunk.job.config
 * @ClassName: SceneConfig
 * @Author: tangguangyuan
 * @Description:场景模块配置
 * @Date: 2021/4/22 14:44
 * @Version: 1.0
 */
@Data
@Component
@RefreshScope
public class SceneConfig {

    @Value("${xxl-job.url}")
    private String xxlJobUrl ;


    public String getXxlJobAddUrl(){
        return this.xxlJobUrl+"/jobinfo/add";
    }

    public String getXxlJobUpdateUrl(){
        return this.xxlJobUrl+"/jobinfo/update";
    }

    public String getXxlJobStopUrl(){return this.xxlJobUrl+"/jobinfo/stop";}

    public String getXxlJobRemove(){return this.xxlJobUrl+"/jobinfo/remove";}

    public String getXxlJobStartUrl(){
        return this.xxlJobUrl+"/jobinfo/start";
    }

    public String getXxlJobRemoveBySceneId(){return this.xxlJobUrl+"/jobinfo/removeBySceneId";}

}
